package com.zhumiao.designpattern.principle.openclose;

/**
 * Created by zhumiao on 2018/10/17.
 */
public class Test {
    public static void main(String[] args) {
        ICourse javaCourse = new JavaDiscountCourse(99,"java课程",345d);
        Double oPrice = ((JavaDiscountCourse) javaCourse).getOriginalPrice();
        System.out.println("课程ID:" + javaCourse.getId() + "课程名称:" + javaCourse.getName() + "课程折后价格:" + javaCourse.getPrice() + "课程原价" + oPrice);

    }
}
